package com.ruoyi.storage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.storage.domain.RepoCk;
import com.ruoyi.storage.domain.RepoWare;
import com.ruoyi.storage.service.RepoCkService;
import com.ruoyi.storage.mapper.RepoCkMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
* @author 标哥
* @description 针对表【repo_ck】的数据库操作Service实现
* @createDate 2022-01-05 19:33:27
*/
@Service
public class RepoCkServiceImpl extends ServiceImpl<RepoCkMapper, RepoCk>
    implements RepoCkService{
    @Autowired
    private RepoCkMapper repoCkMapper;

    @Override
    public List<RepoCk> selectAllCkList(RepoCk repoCk) {
        return repoCkMapper.selectAllCkList(repoCk);
    }

    @Override
    public boolean update(Integer id, Integer status) {
        return repoCkMapper.update(id,status);
    }

    @Override
    public List<String> getAllMarketIndents() {
        return repoCkMapper.getAllMarketIndents();
    }

    @Override
    public List<RepoWare> getAllWare() {
        return repoCkMapper.getAllWare();
    }

    @Override
    public int updateCkStatus(RepoCk repoCk) {
        return repoCkMapper.updateCkStatus(repoCk);
    }

    @Override
    public List<RepoCk> getAll(RepoCk repoRk1) {
        return repoCkMapper.getAll(repoRk1);
    }

    @Override
    public Integer getWareIdByCkId(RepoCk repoCk) {
        return repoCkMapper.getWareIdByCkId(repoCk);
    }

    @Override
    public HashMap<String, Object> getProductIdAndNumByCkId(RepoCk repoCk) {
        return repoCkMapper.getProductIdAndNumByCkId(repoCk);
    }

    @Override
    public boolean updateKcReduce(Integer wareId, Integer productId, Integer num) {
        return repoCkMapper.updateKcReduce( wareId,  productId,  num);
    }

    @Override
    public boolean updateKcAdd(Integer wareId, Integer productId, Integer num) {
        return repoCkMapper.updateKcAdd( wareId,  productId,  num);
    }
}




